<!--
 * @Descripttion: 
 * @Version: 
 * @Author: gaohj
 * @Date: 2022-12-22 16:56:57
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2022-12-22 17:03:09
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var height = parseFloat(prompt('请输入身高(m)','1.85'));
        var weight = parseFloat(prompt('请输入体重(kg)','80'));


        // 体重/身高的平方 => 数据类型的转换  字符串 => 数字
        var bim = weight / (height ** 2);

        console.log('您的身材'+(bim>=18.5 && bim<=23.9));
        // console.log('您的身材'+(23.9>=bim>=18.5));
        // 可能只判断一个条件  不管另外的条件了 不建议第二种写法 

    </script>
</body>
</html>